const mql = require("../DB/USER_MYSQL_DATABASE")

const getMenu = async() => {
    return await mql.query('select * from menu')
}
const setMenu = async(id, data) => {
    return await mql.query(`update menu set url='${data.url}', label='${data.label}', pid=${data.pid}, level=${data.level}  where id=${id}  `)
}

module.exports = {getMenu, setMenu}